package phapp.model.barapp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;


/**
 * <p> 标题: 会员交友日志表, tc_vip_log_friend_info 数据类 POJO
 * <p>Description: DAO层映射到数据类,页面封装数据映射到数据类
 * <p>Copyright: Copyright (c) 2014-10
 * <p>Company: 
 * @author you name
 * @version 1.0
*/

public class VipLogFriend extends BaseEntity {
   
   //date formats
   public static final String FORMAT_CREATE_TIME = DATE_TIME_FORMAT;
   
   //columns START
   /**序列*/
   private java.lang.Integer id;
   /**主动者ID: 会员ID */
   private java.lang.String mainId;
   /**接收者ID*/
   private java.lang.String recipientId;
   /**状态或流程:1申请,2同意,3不同意,4删除好友,5黑名单,6其它*/
   private java.lang.String circuit;
   /**验证消息*/
   private java.lang.String verifyContent;
   /**鲜花数*/
   private java.lang.String roses;
   /**创建时间*/
   private java.sql.Timestamp createTime;
   private VipMain vipMain;
   private java.util.ArrayList idList;
   /**主动者(会员名)*/
   private java.lang.String mainName;
   /**接收者(会员名)*/
   private java.lang.String recipientName;
   
   //columns END

	public VipLogFriend(){
	}

	public VipLogFriend(
		java.lang.Integer id
	){
		this.id = id;
	}
    
    public java.lang.String getMainName() {
		return mainName;
	}

	public void setMainName(java.lang.String mainName) {
		this.mainName = mainName;
	}

	public java.lang.String getRecipientName() {
		return recipientName;
	}

	public void setRecipientName(java.lang.String recipientName) {
		this.recipientName = recipientName;
	}

	public VipMain getVipMain() {
		return vipMain;
	}

	public void setVipMain(VipMain vipMain) {
		this.vipMain = vipMain;
	}

	public void setId(java.lang.Integer value) {
      this.id = value;
   }
   
   public java.lang.Integer getId() {
      return this.id;
   }
   public void setMainId(java.lang.String value) {
      this.mainId = value;
   }
   
   public java.lang.String getMainId() {
      return this.mainId;
   }
   public void setRecipientId(java.lang.String value) {
      this.recipientId = value;
   }
   
   public java.lang.String getRecipientId() {
      return this.recipientId;
   }
   public void setCircuit(java.lang.String value) {
      this.circuit = value;
   }
   
   public java.lang.String getCircuit() {
      return this.circuit;
   }
   public void setVerifyContent(java.lang.String value) {
      this.verifyContent = value;
   }
   
   public java.lang.String getVerifyContent() {
      return this.verifyContent;
   }
   public void setRoses(java.lang.String value) {
      this.roses = value;
   }
   
   public java.lang.String getRoses() {
      return this.roses;
   }
   public String getCreateTimeString() {
      return date2String(getCreateTime(), FORMAT_CREATE_TIME);
   }
   
   public void setCreateTimeString(String value) {
      setCreateTime(string2Date(value, FORMAT_CREATE_TIME,java.sql.Timestamp.class));
   }
   
   public void setCreateTime(java.sql.Timestamp value) {
      this.createTime = value;
   }
   
   public java.sql.Timestamp getCreateTime() {
      return this.createTime;
   }

   public java.util.ArrayList getIdList() {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList) {
      this.idList = idList;
   }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
   public String toString() {
      return new ToStringBuilder(this)
         .append("Id",getId())
         .append("MainId",getMainId())
         .append("RecipientId",getRecipientId())
         .append("Circuit",getCircuit())
         .append("VerifyContent",getVerifyContent())
         .append("Roses",getRoses())
         .append("CreateTime",getCreateTime())
         .toString();
   }
   
   public int hashCode() {
      return new HashCodeBuilder()
         .append(getId())
         .append(getMainId())
         .append(getRecipientId())
         .append(getCircuit())
         .append(getVerifyContent())
         .append(getRoses())
         .append(getCreateTime())
         .toHashCode();
   }
   
   public boolean equals(Object obj) {
      if(obj instanceof VipLogFriend == false) return false;
      if(this == obj) return true;
      VipLogFriend other = (VipLogFriend)obj;
      return new EqualsBuilder()
         .append(getId(),other.getId())
         .append(getMainId(),other.getMainId())
         .append(getRecipientId(),other.getRecipientId())
         .append(getCircuit(),other.getCircuit())
         .append(getVerifyContent(),other.getVerifyContent())
         .append(getRoses(),other.getRoses())
         .append(getCreateTime(),other.getCreateTime())
         .isEquals();
   }
}

